<%@ page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="pageContext" value="${pageContext.servletContext.contextPath}" />

		<div class="navbar navbar-inverse navbar-fixed-top">
      		<div class="navbar-inner">
        		<div class="container">
          			<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            			<span class="icon-bar"></span>
            			<span class="icon-bar"></span>
            			<span class="icon-bar"></span>
          			</button>
          			<a class="brand red" href="${contextPath}/posts">GoW</a>
          			<div class="nav-collapse collapse">
            			<ul class="nav">
              				<li><a href="${contextPath}/posts">Stream</a></li>
            			</ul>
           			<ul class="nav">
              				<li><a href="${contextPath}/postmaken">Post maken</a></li>
            			</ul>
             			<form class="navbar-form pull-right">
							<c:if test="${not empty user}">
								<div class="btn-group">
									<a class="btn btn-info dropdown-toggle" data-toggle="dropdown" href="${loginUrl}"><i class="icon-user icon-white"></i>
										Profiel
										<span class="caret"></span>
									</a>
										<ul class="dropdown-menu">
											<li><a href="/profile"><i class="icon-pencil"></i> Bewerken</a></li>
											<c:url value="/profile" var="viewProfileURL">
											<c:param name="userId" value="${user.userId}" />
											</c:url>
											<li><a href="${viewProfileURL}"><i class="icon-pencil"></i> Weergeven</a></li>
											<li><a href="/logOut"><i class="icon-trash"></i> Afmelden</a></li>
											<li class="divider"></li>
											<li><a href="#"><i class="i"></i> Make admin</a></li>
										</ul>
								</div>
							</c:if>
						</form>
						<!-- AANMELDEN -->
						<form action="registration" method="get" class="navbar-form pull-right">
							<c:if test="${empty user}">
              					<button type="submit" class="btn btn-info">Aanmelden</button>
              				</c:if>
            			</form>
          			</div><!--/.nav-collapse -->
        		</div>
      		</div>
			<c:if test="${not empty user}">
				<p class="red pull-right">Welkom - ${user.nickname}</p>
			</c:if>
    	</div>
